package org.gd.hellospring.simple;


public class SimpleDao implements SimpleDaoLocal {

    public SimpleUser user = null;//new SimpleUser(10, "name1");
    public SimpleUser defUser;

    public SimpleDao() {
    }

    public SimpleDao(SimpleUser user, SimpleUser defUser) {
        this.user = user;
        this.defUser = defUser;
    }

    public void setUser(SimpleUser user) {
        this.user = user;
    }

    public void setDefUser(SimpleUser defUser) {
        this.defUser = defUser;
    }

    @Override
    public SimpleUser getDefUser() {
        return defUser;
    }

    @Override
    public SimpleUser getUser() {
        return user != null ? user : defUser;
    }

    @Override
    public void deleteUser() {
        // doSomething()
    }
}
